const mutations = { // 修改state数据
  setPlayingState(state, playing) { // 修改歌曲播放状态
    state.playing = playing
  },
  setSquenceList(state, list) { // 顺序播放列表
    state.sequenceList = list
  },
  setPlaylist(state, list) { // 播放列表
    state.playlist = list
  },
  setPlayMode(state, mode) { // 设置播放模式
    state.playMode = mode
  },
  setCurrentIndex(state, index) { // 设置播放索引
    state.currentIndex = index
  },
  setfullScreen(state, fulit) { // 设置播放模式收缩展开
    state.fullScreen = fulit
  },
  setFavoriteList(state, list) { // 收藏歌曲列表
    state.favoriteList = list
  },
  addSangLyric(state, { song, lyric }) { // 给歌曲添加歌词
    state.sequenceList.map((item) => {
      if (item.mid === song.mid) { // 歌曲列表中找到此歌曲
        item.lyric = lyric
      }
      return item
    })
  }

}
export default mutations
